﻿#region Copyrights Notice
//©2010 Microsoft Corporation. All rights reserved.
#endregion

#region usings
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
#endregion

namespace Microsoft.InformationSecurity.CISF.SecurityPortal.UI.Web.Widgets.MasterControls
{
    public partial class WidgetPanelContainer : System.Web.UI.UserControl
    {
        private string[] Panels = new string[] { "LeftSingleWidgetPanel", "MiddleSingleWidgetPanel", "RightSingleWidgetPanel" };

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void UpdateWidgetPanel(int columnNo)
        {

            SingleWidgetPanel singleWidgetPanel = this.FindControl(Panels[columnNo]) as SingleWidgetPanel;
            singleWidgetPanel.UpdatePanel();
        }

        public Panel[] GetPanels()
        {
            Panel[] InnerPanels = new Panel[3];
            for (int i = 0; i < 3; i++)
            {
                SingleWidgetPanel singleWidgetPanel = this.FindControl(Panels[i]) as SingleWidgetPanel;
                Panel p = singleWidgetPanel.GetWidgetPanel();
                InnerPanels[i] = p;
            }
            return InnerPanels;
        }

    }
}